package cn.elricyu.tt.bean.battle;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public class MyPower {
	private Power power;
	private Power nextPower;
	private Map<String, Army> armyMap = new LinkedHashMap<String, Army>();

	public Power getPower() {
		return power;
	}

	public void setPower(Power power) {
		this.power = power;
	}

	public Power getNextPower() {
		return nextPower;
	}

	public void setNextPower(Power nextPower) {
		this.nextPower = nextPower;
	}

	public Map<String, Army> getArmyMap() {
		return armyMap;
	}

	public void addArmy(Army army) {
		String key = army.getArmyid();
		if (!armyMap.containsKey(key)) {
			armyMap.put(key, army);
		}
	}

	public Army getArmy(String key) {
		return armyMap.get(key);
	}

	public List<Army> getArmyList() {
		List<Army> armyList = new ArrayList<Army>();
		armyList.addAll(armyMap.values());
		return armyList;
	}

}
